package edu.ynu.se.xiecheng.achitectureclass.nongye.entity;

import edu.ynu.se.xiecheng.achitectureclass.common.entity.LogicEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.util.Date;

@Getter
@Setter
@Entity
@Table(name = "camera")
public class Camera extends LogicEntity {

    @Column(name = "device_id", nullable = false, length = 20)
    private String deviceId;  // 外键，关联设备

    @Column(name = "name", nullable = false, length = 50)
    private String name;  // 相机名称

    @Column(name = "resolution", nullable = false, length = 50)
    private String resolution;  // 分辨率

    @Column(name = "frame_rate", nullable = false)
    private Float frameRate;  // 帧率

    @Column(name = "time", nullable = true)
    private Date time;  // 时间，默认为当前时间
}
